<?php
namespace app\admin\validate;

use think\Validate;
// session_start();
class Rolename extends Validate
{
    protected $rule = [
                        //表单名,表单里面的字段名
        'name'  =>  'require|unique:role,name',
    ];
    protected $message  =   [
        'name.require'  => '角色名称必须填写', 
        'name.unique' => '角色名称重复',

    ];

}